home *** CD-ROM | disk | FTP | other *** search
- <refentry id="libgimp-gimputils" revision="19 Jan 2001">
- <refmeta>
- <refentrytitle>gimputils</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>LIBGIMP Library</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>gimputils</refname><refpurpose>Simple utility functions that don't have their own category.</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv><title>Synopsis</title>
- <synopsis>
-
-
-
- <link linkend="gchar">gchar</link>* <link linkend="gimp-strescape">gimp_strescape</link> (const <link linkend="gchar">gchar</link> *source,
- const <link linkend="gchar">gchar</link> *exceptions);
- <link linkend="gchar">gchar</link>* <link linkend="gimp-strcompress">gimp_strcompress</link> (const <link linkend="gchar">gchar</link> *source);
- </synopsis>
- </refsynopsisdiv>
-
-
-
-
-
- <refsect1>
- <title>Description</title>
- <para>
- Right now all you find here is a function taken from glib-1.3 that
- we need in several places. Since Gimp doesn't rely on glib-1.3, we
- provide it here.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Details</title>
- <refsect2>
- <title><anchor id="gimp-strescape">gimp_strescape ()</title>
- <programlisting><link linkend="gchar">gchar</link>* gimp_strescape (const <link linkend="gchar">gchar</link> *source,
- const <link linkend="gchar">gchar</link> *exceptions);</programlisting>
- <para>
- Escapes special characters in a string in the same way as in the
- C language, i.e. either with one of the sequences \b, \f, \n, \r,
- \t, \\, \", or as a three-digit octal escape sequence \nnn.
- </para>
- <para>
- If the list of exceptions is NULL, all ASCII control characters,
- the backslash character, the double-quote character, and all
- non-ASCII characters are escaped.
- </para>
- <para>
- If glib > 1.3 is installed this function is identical to
- <link linkend="g-strescape">g_strescape</link>(). For systems using glib-1.2 this function provides the
- added functionality from glib-1.3.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>source</parameter> :</entry>
- <entry> A string to escape special characters in.
- </entry></row>
- <row><entry align="right"><parameter>exceptions</parameter> :</entry>
- <entry> A string holding characters not to be escaped.
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly allocated copy of the string, with all special
- characters escaped as in the C language.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
- <refsect2>
- <title><anchor id="gimp-strcompress">gimp_strcompress ()</title>
- <programlisting><link linkend="gchar">gchar</link>* gimp_strcompress (const <link linkend="gchar">gchar</link> *source);</programlisting>
- <para>
- Does the opposite of <link linkend="g-strescape">g_strescape</link>(), that is it converts escaped
- characters back to their unescaped form.
- </para>
- <para>
- Escaped characters are either one of the sequences \b, \f, \n, \r,
- \t, \\, \", or a three-digit octal escape sequence \nnn.
- </para>
- <para>
- If glib > 1.3 is installed this function is identical to
- <link linkend="g-strcompress">g_strcompress</link>(). For systems using glib-1.2 this function provides
- the functionality from glib-1.3.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>source</parameter> :</entry>
- <entry> A string to that has special characters escaped.
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly allocated copy of the string, with all escaped
- special characters converted to their unescaped form.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
-
- </refsect1>
-
-
-
- <refsect1>
- <title>See Also</title>
- <para>
- <link linkend="g-strescape">g_strescape</link>()
- </para>
- </refsect1>
-
- </refentry>
-